import request from '@/utils/request'

// 查询采集来源列表
export function listSpiderItem(query) {
  return request({
    url: '/article/spiderItem/list',
    method: 'get',
    params: query
  })
}

// 查询采集来源详细
export function getSpiderItem(id) {
  return request({
    url: '/article/spiderItem/' + id,
    method: 'get'
  })
}

// 新增采集来源
export function addSpiderItem(data) {
  return request({
    url: '/article/spiderItem',
    method: 'post',
    data: data
  })
}

// 修改采集来源
export function updateSpiderItem(data) {
  return request({
    url: '/article/spiderItem',
    method: 'put',
    data: data
  })
}

// 删除采集来源
export function delSpiderItem(id) {
  return request({
    url: '/article/spiderItem/' + id,
    method: 'delete'
  })
}


// 用户状态修改
export function changeSpiderItemStatus(id, status) {
  const data = {
    id,
    status
  };
  return request({
    url: '/article/spiderItem/changeStatus',
    method: 'put',
    data: data
  })
}
